package com.ruoyi.web.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.ApiBankConfigMapper;
import com.ruoyi.web.entity.ApiBankConfig;
import com.ruoyi.web.service.IApiBankConfigService;

/**
 * 充值配置信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-30
 */
@Service
public class ApiBankConfigServiceImpl implements IApiBankConfigService
{
    @Autowired
    private ApiBankConfigMapper apiBackConfigMapper;

    /**
     * 查询充值配置信息
     * 
     * @param id 充值配置信息主键
     * @return 充值配置信息
     */
    @Override
    public ApiBankConfig selectApiBackConfigById(Long id)
    {
        return apiBackConfigMapper.selectApiBackConfigById(id);
    }

    /**
     * 查询充值配置信息列表
     * 
     * @param apiBackConfig 充值配置信息
     * @return 充值配置信息
     */
    @Override
    public List<ApiBankConfig> selectApiBackConfigList(ApiBankConfig apiBackConfig)
    {
        return apiBackConfigMapper.selectApiBackConfigList(apiBackConfig);
    }

    /**
     * 新增充值配置信息
     * 
     * @param apiBackConfig 充值配置信息
     * @return 结果
     */
    @Override
    public int insertApiBackConfig(ApiBankConfig apiBackConfig)
    {
        apiBackConfig.setCreateTime(DateUtils.getNowDate());
        return apiBackConfigMapper.insertApiBackConfig(apiBackConfig);
    }

    /**
     * 修改充值配置信息
     * 
     * @param apiBackConfig 充值配置信息
     * @return 结果
     */
    @Override
    public int updateApiBackConfig(ApiBankConfig apiBackConfig)
    {
        apiBackConfig.setUpdateTime(DateUtils.getNowDate());
        return apiBackConfigMapper.updateApiBackConfig(apiBackConfig);
    }

    /**
     * 批量删除充值配置信息
     * 
     * @param ids 需要删除的充值配置信息主键
     * @return 结果
     */
    @Override
    public int deleteApiBackConfigByIds(Long[] ids)
    {
        return apiBackConfigMapper.deleteApiBackConfigByIds(ids);
    }

    /**
     * 删除充值配置信息信息
     * 
     * @param id 充值配置信息主键
     * @return 结果
     */
    @Override
    public int deleteApiBackConfigById(Long id)
    {
        return apiBackConfigMapper.deleteApiBackConfigById(id);
    }
}
